var scrollAnimate = (function() {
	var settings = {},
		defaults = {
			startAt: 0,					// start experience at
			sectionCheckInterval: 1000,	// check section interval
			clampWidth: 1600,
			tracking: false
		},
		maxScroll = 5000;
	var w = $(window);
		
	var animation = [
		{
			selector: '#container',
			startAt: 0,
			endAt: 1000,
			onStartAnimate:function(anim, scrollDirection){
				
			},
			onEndAnimate:function(anim){},
			keyframes: [
				{ 
					position: 0,
					properties: {
						top: 0
					}
				},
				{
					position: 1,
					ease: TWEEN.Easing.Linear.EaseNone,
					onInit: function( anim ) {
						this.properties['top'] = w.height() - $('#container').height();
					},
					properties: {
						
					}
				}
			]
		},
	];
	
	var init = function( opts ) {
		settings = $.extend( defaults, opts );
		
		scrollParallax = scrollParallax();
		scrollParallax.init({
			animation: animation,
			maxScroll: maxScroll,
			tickSpeed: 50,
			scrollSpeed: 15,
			useRAF: false,
			tweenSpeed: .2,
			container: $('body'),
			onUpdate: function(scrollTopTweened){
				console.log(scrollTopTweened);
			}
		});
	}
	
	return {
		init: init
	}
})();

$(document).ready( function() {
	scrollAnimate.init();
});